import request from '@/utils/request'
let OrderApi = {
    /*订单列表*/
    orderlist(data, errorback) {
        return request._post('/shop/order.order/index', data, errorback);
    },
    /*订单详情*/
    orderdetail(data, errorback) {
        return request._post('/shop/order.order/detail', data, errorback);
    },
    /*售后管理*/
    orderrefund(data, errorback) {
        return request._post('/shop/order.refund/index', data, errorback);
    },
    /*去发货*/
    delivery(data, errorback) {
        return request._post('/shop/order.order/delivery', data, errorback);
    },
    /*确认审核*/
    confirm(data, errorback) {
        return request._post('/shop/order.Operate/confirmCancel', data, errorback);
    },
    /*售后详情*/
    refundDetail(data, errorback) {
        return request._get('/shop/order.refund/detail', data, errorback);
    },
    /*售后审核*/
    Approval(data, errorback) {
        return request._get('/shop/order.refund/audit', data, errorback);
    },
    /*确认收货并退款*/
    receipt(data, errorback) {
        return request._post('/shop/order.refund/receipt', data, errorback);
    },
    /*核销*/
    extract(data, errorback) {
        return request._post('/shop/order.operate/extract', data, errorback);
    },
    /*修改价格*/
    updatePrice(data, errorback) {
        return request._post('/shop/order.order/updatePrice', data, errorback);
    },
    /*平台售后管理*/
    orderplaterefund(data, errorback) {
        return request._post('/shop/order.platerefund/index', data, errorback);
    },
    /*平台售后详情*/
    refundplateDetail(data, errorback) {
        return request._get('/shop/order.platerefund/detail', data, errorback);
    },
    /*平台售后审核*/
    plateApproval(data, errorback) {
        return request._get('/shop/order.platerefund/audit', data, errorback);
    },

    /*需求订单*/
    carOrder(data, errorback) {
        return request._post('/shop/order.carOrder/order_list', data, errorback);
    },
    carOrderDetail(data, errorback) {
        return request._post('/shop/order.carOrder/get_details', data, errorback);
    },
    editCarOrder(data, errorback) {
        return request._post('/shop/order.carOrder/order_post', data, errorback);
    },
    //今日销售统计
    getOrderNumDay(data, errorback) {
        return request._post('/shop/order.carOrder/get_order_count_day', data, errorback);
    },
    //今日司机接单
    getOwnerOrderNumDay(data, errorback) {
        return request._post('/shop/order.carOrder/get_order_owner_count', data, errorback);
    },
    //今日司机退单
    getReturnOwnerOrderDay(data, errorback) {
        return request._post('/shop/order.carOrder/get_order_owner_return', data, errorback);
    },
    //当日订单统计
    dayOrderList(data, errorback) {
        return request._post('/shop/order.carOrder/get_order_days', data, errorback);
    },

    //本月销售统计
    getOrderNumMonth(data, errorback) {
        return request._post('/shop/order.carOrder/get_order_count_month', data, errorback);
    },
    //本月司机接单
    getOwnerOrderNumMonth(data, errorback) {
        return request._post('/shop/order.carOrder/get_order_owner_count_month', data, errorback);
    },
    //本月司机退单
    getReturnOwnerOrderMonth(data, errorback) {
        return request._post('/shop/order.carOrder/get_order_owner_return_month', data, errorback);
    },
    //本月订单统计
    monthOrderList(data, errorback) {
        return request._post('/shop/order.carOrder/get_order_months', data, errorback);
    },

    //销售统计导出
    salePush(data, errorback) {
        return request._post('/shop/order.carOrder/sale_push', data, errorback);
    },
    //司机接单导出
    ownerOrder(data, errorback) {
        return request._post('/shop/order.carOrder/owner_order_push', data, errorback);
    },
    //司机退单导出
    ownerOrderReturn(data, errorback) {
        return request._post('/shop/order.carOrder/owner_return_push', data, errorback);
    },
    //订单统计导出
    orderPush(data, errorback) {
        return request._post('/shop/order.carOrder/order_push', data, errorback);
    },
    //删除订单
    deleteOrder(data, errorback){
      return request._post('/shop/order.carOrder/del_order', data, errorback);
    },


    /*充值订单*/
    rechargeList(data, errorback) {
        return request._post('/shop/order.RechargeOrder/index', data, errorback);
    },
    details(data, errorback) {
        return request._post('/shop/order.RechargeOrder/details', data, errorback);
    },
    edit_recharge(data, errorback) {
        return request._post('/shop/order.RechargeOrder/editPost', data, errorback);
    },
    //删除订单
    deleteRechargeOrder(data, errorback){
      return request._post('/shop/order.RechargeOrder/del_order', data, errorback);
    },
}

export default OrderApi;
